package gongjiao.yunxi.com.utilsprivacypolicy;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.FrameLayout;
import android.widget.ImageView;


import com.aso114.adl.ui.CountdownView;
import com.aso114.adl.ui.SplashHelper;


public class SplashActivity extends AppCompatActivity implements SplashHelper.AdTypeResult{
//    @Override

    @Override
    protected void onResume() {
        splashHelper.onResume();
        super.onResume();
    }

    @Override
    protected void onPause() {
        splashHelper.onPause();
        super.onPause();
    }
    SplashHelper splashHelper;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.spl);
        splashHelper = new SplashHelper(this, new FrameLayout(this),new ImageView(this),new CountdownView(this),this);
        splashHelper.initAdType("ali");
    }

    public void initUContent() {
//        UConstant.initConstant("anzi", "100019", "a4bf209165bf170e5a8a344dcfd850a0",
//                "6010044083075626", "1107707587", "http://api.sjsj.cn/index.php");
      }

    @Override
    public void onAdTypeFail(String s) {

    }

    @Override
    public void onAdFinish() {

    }
//
//    @Override
//    public void initPermission() {
//        SplashActivityPermissionsDispatcher.onNeed1WithPermissionCheck(this);
//    }
//
//    @Override
//    protected void initData() {
//
//    }
//
//    @Override
//    public String getQYID() {
//        return "302c9b3c279dbaed8de5b5505ca55e3a";
////        return "7d9d41bee2112e2f4c3e80f20989091b";
//    }
//
//    @Override
//    public void starMain(int i) {
//Log.d("-------------------------","结束了"+i);
//    }
//
//    @SuppressLint("NeedOnRequestPermissionsResult")
//    @Override
//    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
//        super.onRequestPermissionsResult(requestCode, permissions, grantResults);
//        if (isTrue) {
//            SplashActivityPermissionsDispatcher.onRequestPermissionsResult(this, requestCode, grantResults);
//        }
//    }
//
//    @NeedsPermission(value = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.READ_PHONE_STATE, Manifest.permission.WRITE_EXTERNAL_STORAGE})
//    public void onNeed1() {
//        initADType(1);
//    }
//
//    @SuppressLint("NoCorrespondingNeedsPermission")
//    @OnShowRationale({Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.READ_PHONE_STATE, Manifest.permission.WRITE_EXTERNAL_STORAGE})
//    public void onShowRationale1(final PermissionRequest request) {
//        request.proceed();
//        Log.d("------------","4444444");
//    }
//
//    @OnNeverAskAgain({Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.READ_PHONE_STATE, Manifest.permission.WRITE_EXTERNAL_STORAGE})
//    public void onNeverAsk1() {
//        showDialog();
//        Log.d("------------","3333333");
//        isTrue = false;
//    }
//
//    @OnPermissionDenied({Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.READ_PHONE_STATE, Manifest.permission.WRITE_EXTERNAL_STORAGE})
//    public void onPermission1() {
//        Log.d("------------","2222222");
//        SplashActivityPermissionsDispatcher.onNeed1WithPermissionCheck(SplashActivity.this);
//    }
//

//    @Override
//    protected void onResume() {
//        super.onResume();
//        Log.d("------------","111111111");
//        if (null != dialog) {
//            SplashActivityPermissionsDispatcher.onNeed1WithPermissionCheck(SplashActivity.this);
//        }
//    }

}
